# /usr/bin/python
# -*- coding: utf-8 -*-

import os,sys
BASE_DIR = os.path.dirname(os.path.abspath(os.curdir))
sys.path.append(BASE_DIR)
reload(sys)  
sys.setdefaultencoding('utf8')   
import json
from models.Zabbix import ZBX

Z = ZBX()
groups = Z.get_group(name="")

for group in groups:
    try:
        print group["name"]
    except Exception:
        print group
